From b0c720ef9011145272df094f5417f82e7ceae95f Mon Sep 17 00:00:00 2001
From: Yann Dirson <ydirson@o-computers.com>
Date: Thu, 14 Jan 2016 02:09:17 +0100
Subject: [PATCH 25/27] h3 hdmi: table reformatting for readability, from
 lobodis initial source import

---
 .../video/sunxi/disp2/hdmi/aw/hdmi_bsp_sun8iw7.c   | 41 ++++++++++++----------
 1 file changed, 23 insertions(+), 18 deletions(-)

diff --git a/drivers/video/sunxi/disp2/hdmi/aw/hdmi_bsp_sun8iw7.c b/drivers/video/sunxi/disp2/hdmi/aw/hdmi_bsp_sun8iw7.c
index c24cc53..de86fe0 100755
--- a/drivers/video/sunxi/disp2/hdmi/aw/hdmi_bsp_sun8iw7.c
+++ b/drivers/video/sunxi/disp2/hdmi/aw/hdmi_bsp_sun8iw7.c
@@ -22,24 +22,29 @@ struct pcm_sf
 
 static struct para_tab ptbl[] =
 {
-	{{6			, 1	, 1,  1,		5,	 3, 	0,		1,	 4,		0,		0,	160,	20, 		38, 	124,	240,	22,		0,		0	}},
-	{{21		, 11, 1,  1,		5,	 3, 	1,		1,	 2,		0,		0,	160,	32, 		24, 	126,	32,		24,		0,		0	}},
-	{{2			, 11, 0,  0,		2,	 6, 	1,		0,	 9,		0,		0,	208,	138,		16, 	62, 	224,	45,		0,		0	}},
-	{{17		, 11, 0,  0,		2,	 5, 	2,		0,	 5,		0,		0,	208,	144,		12, 	64, 	64,		49,		0,		0	}},
-	{{19		, 4	, 0,  96,		5,	 5, 	2,		2,	 5,		1,		0,	0,		188,		184,	40, 	208,	30,		1,		1	}},
-	{{4			, 4	, 0,  96,		5,	 5, 	2,		1,	 5,		0,		0,	0,		114,		110,	40, 	208,	30,		1,		1	}},
-	{{20		, 4	, 0,  97,		7, 	 5, 	4,		2,	 2,		2,		0,	128,	208,		16,		44, 	56,		22,		1,		1	}},
-	{{5			, 4	, 0,  97,		7, 	 5, 	4,		1,	 2,		0,		0,	128,	24, 		88, 	44, 	56,		22,		1,		1	}},
-	{{31		, 2	, 0,  96,		7, 	 5, 	4,		2,	 4,		2,		0,	128,	208,		16,		44, 	56, 	45,		1,		1	}},
-	{{16		, 2	, 0,  96,		7, 	 5, 	4,		1,	 4,		0,		0,	128,	24, 		88, 	44, 	56,		45,		1,		1	}},
-	{{32		, 4	, 0,  96,		7, 	 5, 	4,		3,	 4,		2,		0,	128,	62, 		126,	44, 	56,		45,		1,		1	}},
-	{{33		, 4	, 0,  0,		7, 	 5, 	4,		2,	 4,		2,		0,	128,	208,		16,		44, 	56, 	45,		1,		1	}},
-	{{34		, 4	, 0,  0,		7, 	 5, 	4,		1,	 4,		0,		0,	128,	24, 		88, 	44, 	56,		45,		1,		1	}},
-	{{160		,	2	, 0,  96,		7, 	 5, 	8,		3,	 4,		2,		0,	128,	62, 		126,	44, 	157,	45,		1,		1	}},
-	{{147		, 2	, 0,  96,		5,	 5, 	5,		2,	 5,		1,		0,	0,		188,		184,	40, 	190,	30,		1,		1	}},
-	{{132		, 2	, 0,  96,		5,	 5, 	5,		1,	 5,	  0,		0,	0,		114,		110,	40,  	160, 	30,		1,		1	}},
-	{{257		, 1	, 0,  96,		15,	10, 	8,		2,	 8,		0,		0,	0,		48,			176,	88, 	112,	90,		1,		1	}},
-	{{258		, 1	, 0,  96,		15,	10, 	8,		5,	 8,		4,		0,	0,		160,		32,		88, 	112,	90,		1,		1	}},
+	// mx = x>>8
+	// my = y>>8
+	// mhbw = horisontal blanking width >> 8
+	// mhfp = horisontal front porch >> 8
+	// vic           dclk    int       mx     vst      my    mhbw           vfp    mhfp     +x      hbw     hfp     hst     +y      vbw      h polarity v polarity
+	{{6		, 1	, 1,  1,	5,	 3, 	0,	1,	 4,	0,	0,	160,	20, 	38, 	124,	240,	22,	0,	0	}},
+	{{21		, 11    , 1,  1,	5,	 3, 	1,	1,	 2,	0,	0,	160,	32, 	24, 	126,	32,	24,	0,	0	}},
+	{{2		, 11    , 0,  0,	2,	 6, 	1,	0,	 9,	0,	0,	208,	138,	16, 	62, 	224,	45,	0,	0	}},
+	{{17		, 11    , 0,  0,	2,	 5, 	2,	0,	 5,	0,	0,	208,	144,	12, 	64, 	64,	49,	0,	0	}},
+	{{19		, 4	, 0,  96,	5,	 5, 	2,	2,	 5,	1,	0,	0,	188,	184,	40, 	208,	30,	1,	1	}},
+	{{4		, 4	, 0,  96,	5,	 5, 	2,	1,	 5,	0,	0,	0,	114,	110,	40, 	208,	30,	1,	1	}},
+	{{20		, 4	, 0,  97,	7, 	 5, 	4,	2,	 2,	2,	0,	128,	208,	16,	44, 	56,	22,	1,	1	}},
+	{{5		, 4	, 0,  97,	7, 	 5, 	4,	1,	 2,	0,	0,	128,	24, 	88, 	44, 	56,	22,	1,	1	}},
+	{{31		, 2	, 0,  96,	7, 	 5, 	4,	2,	 4,	2,	0,	128,	208,	16,	44, 	56, 	45,	1,	1	}},
+	{{16		, 2	, 0,  96,	7, 	 5, 	4,	1,	 4,	0,	0,	128,	24, 	88, 	44, 	56,	45,	1,	1	}},
+	{{32		, 4	, 0,  96,	7, 	 5, 	4,	3,	 4,	2,	0,	128,	62, 	126,	44, 	56,	45,	1,	1	}},
+	{{33		, 4	, 0,  0,	7, 	 5, 	4,	2,	 4,	2,	0,	128,	208,	16,	44, 	56, 	45,	1,	1	}},
+	{{34		, 4	, 0,  0,	7, 	 5, 	4,	1,	 4,	0,	0,	128,	24, 	88, 	44, 	56,	45,	1,	1	}},
+	{{160		, 2	, 0,  96,	7, 	 5, 	8,	3,	 4,	2,	0,	128,	62, 	126,	44, 	157,	45,	1,	1	}},
+	{{147		, 2	, 0,  96,	5,	 5, 	5,	2,	 5,	1,	0,	0,	188,	184,	40, 	190,	30,	1,	1	}},
+	{{132		, 2	, 0,  96,	5,	 5, 	5,	1,	 5,     0,	0,	0,	114,	110,	40, 	160, 	30,	1,	1	}},
+	{{257		, 1	, 0,  96,	15,	10, 	8,	2,	 8,	0,	0,	0,	48,	176,	88, 	112,	90,	1,	1	}},
+	{{258		, 1	, 0,  96,	15,	10, 	8,	5,	 8,	4,	0,      0,	160,	32,	88, 	112,	90,	1,	1	}},
 };
 
 static unsigned char ca_table[64]=
-- 
1.9.1

